<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title>员工管理</title>
</head>
<body>
<div class="contant">
<div class="row"> <h3 class="page-header">员工管理</h3></div>
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-body">
            	<label><a class="btn btn-primary" href="{:U('Admins/add')}">添加员工</a></label>
                <form action='{:U("Admins/index")}' class="form-inline text-right m-b-5 fr">
                    <input type="text" name='name' value='{$Think.get.name}' class="form-control mr20 w150" placeholder="员工姓名">
                    <input type="text" name='tel' value='{$Think.get.tel}' class="form-control mr20 w150" placeholder="手机号码">
                    <select name='gid' class="form-control mr20 w150">
                        <option value='-1'>所属组</option>
                        <volist name="groupList" id="group">
                        	<option value='{$group.id}' <eq name='Think.get.gid' value="$group['id']">selected</eq>>{$group.name}</option>
                        </volist>
                    </select>
                    <select name='status'>
                        <option value='-1'>状态</option>
                        <option value='1' <eq name='Think.get.status' value='1'>selected</eq> >启用</option>
                        <option value='0' <eq name='Think.get.status' value='0'>selected</eq> >禁用</option>
                    </select>
                    <button class="btn btn-primary" type="submit">搜索</button>
                </form>
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="60">序号</th>
                                <th>员工名称</th>
                                <th>手机号码</th>
                                <th>所属组</th>
                                <th>所属部门</th>
                                <th>最后登录时间</th>
                                <th>最后登录IP地址</th>
                                <th width="75">状态</th>
                                <th width="120">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <volist name="list" id="list">
                                <tr>
                                    <td>{$i}</td>
                                    <td>{$list.name}</td>
                                    <td>{$list.tel}</td>
                                    <td>{$list.groupname}</td>
                                    <td>{$list.pname}</td>
                                    <td>
                                       <gt name="list.last_login_time" value='0'>{$list.last_login_time|date='Y-m-d H:i', ###}<else />未登录</gt>
                                    </td>
                                    <td>{$list.last_login_ip|default='未登录'}</td>
                                    <td class="center">
                                     	<button class='btn <eq name="list.status" value="1">btn-primary<else />btn-default</eq> btn-sm setStatus' type="button" data-url='{:U("Admins/setStatus?id=".$list["id"])}' data-status="{$list.status}"><eq name="list.status" value='1'>启用<else />禁用</eq></button>
                                    </td>
                                    <td>
                                        <a class=" btn-sm btn btn-default" href='{:U("Admins/edit?id=".$list["id"])}'>修改</a>
                                        <gt name="list.id" value="1"><button data-url='{:U("Admins/del?id=".$list["id"])}' class=" btn-sm btn btn-default delBtn" type="button">删除</button></gt>
                                    </td>
                                </tr>
                            </volist>
                        </tbody>
                    </table>
                </div>
                {$page}
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>